import request from '@/utils/request'
import type R from '@/types/conduit/R'
import type RiderWorkRegion from '@/types/entity/RiderWorkRegion'
import type LocationInfo from '@/types/entity/LocationInfo'

export const queryRiderWorkRegion = (): Promise<R<RiderWorkRegion>> =>
  request({
    url: `/rider/rider-work-region/query`,
    method: 'GET'
  })
export const updateRiderWorkRegion = (locationInfo: LocationInfo): Promise<R<null>> =>
  request({
    url: `/rider/rider-work-region/update`,
    method: 'POST',
    data: locationInfo
  })
